"""
file from project: http://code.google.com/p/django-registration/ project

URLConf for Django user registration and authentication.

Recommended usage is a call to ``include()`` in your project's root
URLConf to include this URLConf for any URL beginning with
``/accounts/``.

"""

import re

from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from django.contrib.auth import views as auth_views

from task.views import activate, register, registration_complete, edit_profiele, edit_profiele_done, userpanel, change_singin






urlpatterns = patterns('',
                       # Activation keys get matched by \w+ instead of the more specific
                       # [a-fA-F0-9]{40} because a bad activation key should still get to the view;
                       # that way it can return a sensible "invalid key" message instead of a
                       # confusing 404.
                       url(r'^activate/(?P<activation_key>\w+)/$',
                           activate,
                           name='registration_activate'),
                       url(r'^login/$',
                           auth_views.login,
                           {'template_name': 'accounts/login.html'},
                           name='auth_login'),
                       url(r'^logout/$',
                           auth_views.logout,
                           {'template_name': 'accounts/logout.html', # logut is redirect to root
                            'next_page':'/'},
                           name='auth_logout'),
                       url(r'^password/change/$',
                           auth_views.password_change, 
                           {'template_name': 'accounts/password_change.html'},
                           name='auth_password_change'),
                       url(r'^password/change/done/$',
                           auth_views.password_change_done,
                           {'template_name': 'accounts/password_change_done.html'},
                           name='auth_password_change_done'),
                       url(r'^password/reset/$',
                           auth_views.password_reset,
                           {'template_name': 'accounts/password_reset_form.html',
                            'email_template_name': 'accounts/password_reset_email.html'},
                           name='auth_password_reset'),
                       url(r'^password/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
                           auth_views.password_reset_confirm,
                           {'template_name': 'accounts/password_reset_confirm.html'},
                           name='auth_password_reset_confirm'),
                       url(r'^password/reset/complete/$',
                           auth_views.password_reset_complete,
                           {'template_name': 'accounts/password_reset_complete.html'},
                           name='auth_password_reset_complete'),
                       url(r'^password/reset/done/$',                           
                           auth_views.password_reset_done,
                           {'template_name': 'accounts/password_reset_done.html'},
                           name='auth_password_reset_done'),
                       url(r'^register/$',
                           register,
                           name='registration_register'),
                           
                       url(r'^edit/profile/$',
                           edit_profiele,
                           name='edit_profile'),
                       
                       url(r'^edit/profile/done/$',
                           edit_profiele_done,   
                           name='profile_edit_personal_done'),
                       #url(r'^register/complete/$',
                       #   direct_to_template,
                       #  {'template': 'accounts/registration_complete.html'},                                                    
                       #  name='registration_complete'),

                        url(r'^register/complete/(?P<email>[^<>]*)/$',
                           registration_complete,
                           name='registration_complete'),
                           
                        url(r'^userpanel/$',
                           userpanel,
                           name='userpanel'),  
                           
                        url(r'^change/singin/$',
                            change_singin,
                            name='change_singin'),                        

                       )
